package String案例;

import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;

import java.util.Random;
import java.util.Scanner;

public class 验证码 {
    public static void main(String[] args) {
        String yzm="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
        System.out.println("输入验证码长度");
        Scanner sr=new Scanner(System.in);
        Random sj=new Random();
        String y="";
        int n=sr.nextInt();
        for (int i = 0; i < n; i++) {
            y+=yzm.charAt(sj.nextInt(yzm.length()));
        }
        System.out.println(y);
    }
}
